<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
    <title>登录（复杂页面）</title>
    <link rel="stylesheet" href="/static/css/style.css">
    <script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/static/js/html2canvas.min.js"></script>
</head>
<body class="login-bg">
<input id="appId" type="hidden" value="login.ftl"/>
<input id="userId" type="hidden" value="36597842"/>
<input id="pageName" type="hidden" value="登陆/login"/>
<input id="apiUrl" type="hidden" value="/screen/restore"/>
<div class="login-contain">
    <div class="login-header">
        <p>欢迎登录</p>
    </div>
    <div class="form-group">
        <div class="form-item">
            <label for="username">
                <img src="/static/img/user.png">
            </label>
            <input id="username" type="text" placeholder="请输入账号">
        </div>
        <div class="form-item">
            <label for="password">
                <img src="../static/img/password.png" alt="">
            </label>
            <input id="password" type="password" placeholder="请输入密码">
        </div>
    </div>
    <div class="button-group">
        <button class="login-btn" id="doLogin">登录</button>
    </div>

    <div class="order-login">
        <p class="order-login-line">其他登录方式</p>
        <div class="order-login-box">
            <div>
                <a href="#">
                    <img src="/static/img/wechat-login.png" alt="" style="width: 45px;height: 45px;">
                    <p>微信登录</p>
                </a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/static/js/exception-log.js"></script>
<script>
    $(function(){
        $(window).resize();
    });
    //js设置居中
    $(window).resize(function(){
        $(".login-contain").css({
            position: "absolute",
            left: ($(window).width() - $(".login-contain").outerWidth())/2,
            top: ($(window).height() - $(".login-contain").outerHeight())/2
        });
    });
</script>
<script>
    $("#doLogin").click(function(){
        console.log("模拟异常开始");
        data.action = "登陆报错";
        exception();
        console.log("模拟异常结束");
    });
</script>

</body>
</html>
